public class WorkDemo2 {
    public static int calFactorial(int num){
        if (num==1) return 1;
        return calFactorial(num-1)*num;

    }

    public static void main(String[] args) {
        int num=1;
        int JC=calFactorial(5);
        System.out.println(JC);
    }
}
